'''
https://leetcode.cn/problems/eliminate-maximum-number-of-monsters/description/
'''

from typing import List
class Solution:
    def eliminateMaximum(self, dist: List[int], speed: List[int]) -> int:
        times = [(d + s - 1) // s for s, d in zip(speed, dist)]
        times.sort()
        n = len(times)
        for t in range(n):
            if t >= times[t]:
                return t
        return n
